package com.itheima.dao.system;

import com.itheima.domain.system.Permission;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
   * @Description:
   * @Param:
   * @return:
   * @Author:YangJinbo
   * @Date:2020/11/30
   */
public interface PermissionDao {
    /**
       * @Description: 保存
       * @Param: save
       * @return:
       * @Author:YangJinbo
       * @Date:2020/11/30
       */
    int save(Permission permission);

    /**
     * @Description: 删除
     * @Param: delete
     * @return:
     * @Author:YangJinbo
     * @Date:2020/11/30
     */
    int delete(Permission permission);

    /**
     * @Description: 查询全部
     * @Param: findAll
     * @return:list
     * @Author:YangJinbo
     * @Date:2020/11/30
     */
    List<Permission> findAll();

    /**
     * @Description: 根据权限名查询
     * @Param: findAllByPermissionName
     * @return:list
     * @Author:YangJinbo
     * @Date:2020/11/30
     */
    List<Permission> findAllByPermissionName(@Param("permissionName") String permissionName);

    /**
     * @Description: 根据id删除
     * @Param: deleteById
     * @return:list
     * @Author:YangJinbo
     * @Date:2020/11/30
     */
    void deleteById(String deleteId);

    Permission findById(String id);

}
